/*
 * @Author: fah 1742484532@qq.com
 * @Date: 2024-08-28 16:46:26
 * @LastEditors: fah 1742484532@qq.com
 * @LastEditTime: 2024-09-14 09:29:35
 * @FilePath: \livetree-admin-server\src\users\entities\user.entity.ts
 * @Description: 指飞部-企业数字化管理系统
 * @version: 1.0
 */
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class User {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ default: '', length: 16 })
  username: string;

  @Column({ default: '', length: 16 })
  password: string;

  @Column({ default: '', length: 100 })
  name: string;

  @Column({ default: '', length: 16 })
  nickname: string;

  @Column({ default: 0 })
  age: number;

  @Column()
  user_type: number;

  @Column({ default: 1 })
  status: number;
  
  @Column({ default: 1 })
  sex: number;

  @Column({ default: '', length: 100 })
  open_id: string;

  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  create_time: Date;

  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  update_time: Date;
}
